/**
 * @param {string} s1
 * @param {string} s2
 * @return {boolean}
 */
 var CheckPermutation = function(s1, s2) {
  if(s1.length!=s2.length) return false
  let temp1,temp2
  temp1 = s1.split("").sort().join("")
  temp2 = s2.split("").sort().join("")
  if(temp1 == temp2)return true
  else return false
};

console.log(CheckPermutation('abc','bca'));

